<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/views/include/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@ include file="/views/include/nocachehead.jsp"%>
<%@ include file="/views/include/statusbar.jsp"%>
<title>${spotInfo.name}</title>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/payattention.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/pagination.js"></script>

<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/comment.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery.raty.min.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/stringutil.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/base.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/feed.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/shortMessage.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/notification.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/video.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/ratyStar.js"></script>
</head>
<script type="text/javascript">

$(document).ready(function(){
//	$('#myStar').starLevel();

//	AjaxstarInit(spotStar,${spotInfo.id},${spotInfo.star});
	//alert($('#content').html().length);
	//showDepart();
});
</script>
<style type="text/css">
.mainBox1 {
	border: 0px dashed #0099CC;
	margin: 3px;
	padding: 0px;
	float: left;
	height: 800px;
	width: 700px;
}

.spotInfo {
	border: 0px dashed #0099CC;
	margin: 3px;
	padding: 0px;
	float: left;
	height: 800px;
	width: 260px;
}

.SCInfo {
	border: 0px dashed #0099CC;
	margin: 3px;
	padding: 0px;
	float: left;
	height: 250px;
	width: 700px;
}

.basicInfo {
	border: 0px dashed #0099CC;
	margin: 3px;
	padding: 0px;
	float: left;
	height: 240px;
	width: 420px;
}

.portraitInfo {
	border: 0px dashed #0099CC;
	margin: 3px;
	padding: 0px;
	float: left;
	height: 220px;
	width: 220px;
}

.photoInfo {
	border: 0px dashed #0099CC;
	margin: 3px;
	padding: 0px;
	float: left;
	height: 100px;
	width: 450px;
}

.adminview {
	border: 0px dashed #0099CC;
	margin: 3px;
	padding: 0px;
	float: left;
	height: 120px;
	width: 250px;
}

.introductionView {
	border: 0px dashed #0099CC;
	margin: 3px;
	padding: 0px;
	float: left;
	height: 100px;
	width: 250px;
}

.fansView {
	border: 0px dashed #0099CC;
	margin: 3px;
	padding: 0px;
	float: left;
	height: 30px;
	width: 250px;
}

.starclass {
	font: 10px verdana;
}

#bodyDiv {
	position: relative;
	top: 42px;
	width: 960px;
	min-height: 500px;
	height: auto !important;
	margin: 0 auto;
}

#woOwnerDiv {
	float: right;
	width: 240px;
	height: 500px;
	background: #ffff;
	left: 10px;
}

#content {
	float: left;
	width: 720px;
	min-height: 500px;
	background: #ffff;
}

hr {
	boder: 1px dashed #cccccc;
}
</style>
<script type="text/javascript">
MyNewsDivChoose={
		shortMessage:function()
		{
			$("#shortMessageDiv").css("display","block");
			$("#photoDiv").css("display","none");
			$("#videoDiv").css("display","none");
		},
		photo:function()
		{
			$("#shortMessageDiv").css("display","none");
			$("#photoDiv").css("display","block");
			$("#videoDiv").css("display","none");
		},
		video:function()
		{
			$("#shortMessageDiv").css("display","none");
			$("#photoDiv").css("display","none");
			$("#videoDiv").css("display","block");
		}
}

function addSpotChar()
{
	$.ajax({
		url:"/skyline/spot/char/add.html",
		type:"POST",
		data:"ownerId="+${spotInfo.id}+"&charTitle="+$('#spotCharTile').val()+"&charDetail="+$('#spotCharDetail').val(),
		dataType:"json",
		contentType : "application/x-www-form-urlencoded; charset=utf-8",
		success : function(obj) {
			if (obj == null) {
			// ajaxLogin();
			} else{
				if(obj.loginStatus==false){
					$.alerts._hide();	
					ajaxLogin();
				}
				else if(obj.loginStatus==true){
					if(obj.addStaus==false){
						$.alerts._hide();	
						location.reload();
						alert("添加特色失败！");
					}else if(obj.addStaus == true){
						$.alerts._hide();	
						location.reload();
						alert("添加特色成功！");
						}
				}
			}
		}
	});	
}
function support(charId,num)
{
	$.ajax({
		url:"/skyline/spot/char/support.html",
		type:"POST",
		data:"charId="+charId,
		dataType:"json",
		contentType : "application/x-www-form-urlencoded; charset=utf-8",
		success : function(obj) {
			if (obj == null) {
			// ajaxLogin();
			}else{
				if(obj.supportStatus==true){
					alert("谢谢参与");
					num+=1;
					$('a#'+charId).css('background-color','#888888');
					$('a#'+charId).text("已支持("+num+")");
				//	$('a#'+charId).onclick(function(){});
					document.getElementById(charId).onclick='';
				}
					
			}
		}
	});	
}
function tableHide()
{
	$.alerts._hide();	
}
function setCharTable() {
	var charTable = "<table><tr><td>标题:</td><td><input type='text' id='spotCharTile'/></td></tr><tr><td>内容:</td><td><textarea rows='5' cols='30' id='spotCharDetail'></textarea></td></tr><tr><td colspan='2' align='right'><input type='button' onclick='addSpotChar()' value='提交'>&nbsp;<input type='button' onclick='tableHide()' value='取消'>&nbsp;&nbsp;</td></tr></table>";
	jMessageBox(charTable, '添加特色');
}
$(document).ready(function(){
	if(${authority}==25)
		{
		}else{
			$('a#edit').hide();
		}
	
	
});
</script>
<body>
	<br>
	<br>

<div class="topInfo">
<a href="${pageContext.request.contextPath}/spot/chara/${requestScope.scInfo.spotId}/list.html">查看更多</a>
</div>
	<div class="mainBox1">
		<div class="SCInfo">
			特色基本信息

			<div class="basicInfo">
				特色文字信息
				<table>
					<tr>
						<td colspan="2">${requestScope.scInfo.characteristicTitle}</td>
					</tr>
					<tr>
						<td>基本消费：</td>
						<td>${requestScope.scInfo.consume}</td>
					</tr>
					<tr>
						<td>用户打分：</td>
						<td><skyline:ratyStar startStar="${scInfo.star }"
								objId="${scInfo.id }" isBig="false" isReadOnly="false"
								objType="SC"></skyline:ratyStar> <a id="voteNum">${scInfo.votes
								}</a>
						</td>
					</tr>
					<tr>
						<td>更新时间：</td>
						<td>${requestScope.scInfo.updateTime}</td>
					</tr>
				</table>
			</div>
			<div class="portraitInfo">
				特色头像 <img title="${requestScope.scInfo.characteristicTitle}"
					src="${portraitPath }/${requestScope.scInfo.portrait}">
			</div>
		</div>
		<div class="photoInfo">特色的图片有待添加</div>
	</div>
	<div class="spotInfo">Spot的信息</div>
</body>
</html>